﻿<local:DocumentBase x:Class="WPFExcelReport.JLTONAV95"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                        xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                         xmlns:db="clr-namespace:INTEX.DataBase"
                         Height="700" Width="1024" 
                        Loaded="Window_Loaded" 
                        FontSize="16" 
                        Background="White" 
                        Title="创建订单网络" 
                        HorizontalAlignment="Stretch"
                        Margin="0,0,0,0" 
                        VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <db:SETINTEXDB  x:Key="SetEnv" />        
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKWDECK" Source="{Binding Path=WDECK,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwWAFARBEN" Source="{Binding Path=WAFARBEN,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBSSATZ" Source="{Binding Path=BSSATZ,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwBHSATZ" Source="{Binding Path=BHSATZ,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwBSFARB" Source="{Binding Path=BSFARB,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTGEW" Source="{Binding Path=WTGEW,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWASTKE" Source="{Binding Path=WASTKE,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBASTKE" Source="{Binding Path=BASTKE,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWASTPASS" Source="{Binding Path=WASTPASS,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwWABIND" Source="{Binding Path=WABIND,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTEINZ" Source="{Binding Path=WTEINZ,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTPASS" Source="{Binding Path=WTPASS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWTSCHUSS" Source="{Binding Path=WTSCHUSS,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWADART" Source="{Binding Path=WADART,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwBASTGA" Source="{Binding Path=BASTGA,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwWASTGA" Source="{Binding Path=WASTGA,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetProd}}" />
        <CollectionViewSource  x:Key="vwABAUFM" Source="{Binding Path=ICC_ABAUFM,Source={StaticResource SetProd}}" />
        <CollectionViewSource  x:Key="vwWFGAAUF" Source="{Binding Path=WFGAAUF,Source={StaticResource SetData}}" />
        <CollectionViewSource  x:Key="vwGAAUF" Source="{Binding Path=GAAUF,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid   DataContext="" Width="1200" Margin="10,10,0,0" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="Auto" />
            <RowDefinition  Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="300" />
            <ColumnDefinition Width="300" />
            <ColumnDefinition   Width="300" />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <StackPanel   Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <Expander  Header="查询条件"  Name="expQueryCond" ExpandDirection="Down" IsExpanded="True">
                <StackPanel  >
                    <Expander Name="expLog" ExpandDirection="Left" IsExpanded="True">
                        <WrapPanel Name="zoneCommand" Height="34" Margin="0,0,0,6">
                            <Label   Content="系统" Width="40" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox   Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                            <Label  Content="语言" Width="40" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox   IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                            <Label  Content="用户名" Width="60" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <TextBox  Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" />
                            <Label Content="密码" Width="40" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                            <PasswordBox  Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                            <Button  Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="34" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True">
                                <Button.Background>
                                    <ImageBrush ImageSource="Image/User.png" />
                                </Button.Background>
                            </Button> 
                            <TextBlock  Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                        </WrapPanel>
                    </Expander>
                    <WrapPanel >
                        <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetVKKOPF" Click="btnQuery_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Search.png" />
                            </Button.Background>
                        </Button>
                        <Button  Height="30"  Width="30" Margin="10,0,0,0"   IsEnabled="True" Click="btnRefresh_Click">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Reload.png" />
                            </Button.Background>
                        </Button>
                        <Button  Height="30"  Width="30" Margin="10,0,0,0"   Click="btnInsertt_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Add.png" />
                            </Button.Background>
                        </Button>
                        <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnDeleteABON" Click="btnDeleteABON_Click" KeyboardNavigation.TabIndex="3" IsDefault="True">
                            <Button.Background>
                                <ImageBrush ImageSource="Image/Delete.png" />
                            </Button.Background>
                        </Button>
                        <TextBlock Width="Auto">订单号:</TextBlock>
                        <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper"/>
                        <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0"   HorizontalAlignment="Left" KeyUp="txtVKPAUFLFD_KeyUp"/>
                        <TextBox  Name="txtVKPAUFPOS" Width="60" Margin="0,0,0,0" Text="{Binding Path=VKPAUFPOS, Source={StaticResource ResourceKey=vwVKPOS}}" HorizontalAlignment="Left" Background="Yellow" KeyboardNavigation.TabIndex="0" />
                        <TextBlock Width="Auto">数量:</TextBlock>
                        <TextBlock Name="txtVKPMENGE1" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPMENGE1, Source={StaticResource ResourceKey=vwVKPOS}, Converter={StaticResource ResourceKey=d100}}"></TextBlock>
                        <TextBlock Width="Auto">单位:</TextBlock>
                        <TextBlock Name="txtVKPMEEH" Margin="10,0,0,0" Width="Auto" Text="{Binding Path=VKPMEEH, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                        <TextBlock Width="Auto">交期:</TextBlock>
                        <TextBlock Name="txtVKPLIEFTERM" Margin="10,0,0,0" Width="Auto" MinWidth="80" Background="Gray" Text="{Binding Path=VKPLIEFTERM, Source={StaticResource ResourceKey=vwVKPOS}}"></TextBlock>
                    </WrapPanel> 
                        <WrapPanel>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="客户号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                 Text="{Binding Path=VKKKUNDNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="发货条件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKLIEFBED, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="运输方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKVERSART, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="销售合同:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKBESTNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                        </WrapPanel> 
                    <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKPOS}}"  
                              HeadersVisibility="Column"
                              x:Name="dgVKPOS"    
                              Width="Auto"
                              Height="Auto"
                              MaxHeight="150"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=VKPAUFPOS}" Header="POS"   Width="Auto"  MinWidth="30"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="类型"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPZUSATZ,Converter={StaticResource ResourceKey=gb2312}}" Header="标准"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="颜色"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPKDARTNR, Converter={StaticResource ResourceKey=gb2312}}" Header="客人花号"   Width="Auto"  MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPKDFARBNR, Converter={StaticResource ResourceKey=gb2312}}" Header="" Width="Auto" MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMENGE1, Converter={StaticResource ResourceKey=d100}}" Header="数量" Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMGV, Converter={StaticResource ResourceKey=d100}}" Header="最少"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMGB, Converter={StaticResource ResourceKey=d100}}" Header="最多"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="交期"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWVTERM}" Header="船样"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPVERPART, Converter={StaticResource ResourceKey=gb2312}}" Header="包装要求"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPAUFMART, Converter={StaticResource ResourceKey=gb2312}}" Header=""  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPTSTLG, Converter={StaticResource ResourceKey=d1000}}" Header="标准匹长"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPSTLGV, Converter={StaticResource ResourceKey=d1000}}" Header="最小"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPSTLGB, Converter={StaticResource ResourceKey=d1000}}" Header="最大"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                      <DataGrid 
                        AutoGenerateColumns="False" EnableRowVirtualization="True"  
                            ItemsSource="{Binding Path=vwWASTAMM}"  
                            HeadersVisibility="Column"
                            x:Name="dgWASTAMM"  
                            CanUserReorderColumns="True"  
                            CanUserResizeRows="True"
                            CanUserSortColumns="True" 
                            RowDetailsVisibilityMode="VisibleWhenSelected"   
                            Width="Auto"
                            Height="Auto"
                            EnableColumnVirtualization="True"  
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto" 
                            >
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Path=WAART }" Header="品种"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=WAVAR}" Header="变量"   Width="Auto"  MinWidth="40"/>
                                <DataGridTextColumn Binding="{Binding Path=WABEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="描述"   Width="Auto"  MinWidth="120"/>
                            </DataGrid.Columns>
                        </DataGrid>        
                    <WrapPanel>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <StackPanel  Grid.Row="0">
                                <WrapPanel>
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition   Height="Auto" />
                                            <RowDefinition   Height="Auto" MinHeight="150" />
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition  Width="1*" /> 
                                            <ColumnDefinition Width="1*" />
                                        </Grid.ColumnDefinitions>
                                        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4">
                                            <WrapPanel >
                                                <Label   Content="后整周期:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                                <TextBox  Name="txtLDAB05"  MaxLength="2" Width="30" Margin="10,0,0,0" Text="7" HorizontalAlignment="Left" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                                <Label   Content="织造周期:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                                <TextBox  Name="txtLDAB55"  MaxLength="2" Width="30" Margin="10,0,0,0" Text="14" HorizontalAlignment="Left" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                                <Label   Content="浆纱周期:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                                <TextBox  Name="txtLDAB45"  MaxLength="2" Width="30" Margin="10,0,0,0" Text="3" HorizontalAlignment="Left" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                                <Label   Content="染色周期:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                                <TextBox  Name="txtLDAB50"  MaxLength="2" Width="30" Margin="10,0,0,0" Text="14" HorizontalAlignment="Left" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                            </WrapPanel>
                                            <WrapPanel >  
                                            <Label   Content="品种:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                                            <TextBox  Name="txtART"  MaxLength="20" Width="240" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                            <TextBox  Name="txtVAR" MaxLength="2" Width="40" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" />
                                            <TextBlock  Margin="20,0,0,0" Width="43">颜色:</TextBlock>
                                            <TextBox  Name="txtWAFZUSATZ" Text="中色        " Background="#17000000" Height="27" Width="44">
                                            </TextBox>
                                            <TextBlock  Margin="20,0,0,0" Width="60" Height="24">后整理:</TextBlock>
                                            <TextBox  Name="txtFINISH" Text="F1          " Background="#17000000" Height="24" Width="53">
                                            </TextBox> 
                                        </WrapPanel>
                                            <WrapPanel>
                                                <TextBlock>类型</TextBlock>
                                                <TextBlock Text="{Binding Path=ORDTYPE, Source=vwABPOS}" Width="100"></TextBlock>
                                                <TextBlock>数量</TextBlock>
                                                <TextBox Text="{Binding Path=QUANTITY, Source=vwABPOS}" Width="100"></TextBox>
                                                <TextBlock Text="{Binding Path=UM, Source=vwABPOS}" Width="20"></TextBlock>
                                                <TextBlock>交期</TextBlock>
                                                <TextBox Text="{Binding Path=DELIVERYDATE, Source=vwABPOS}" Width="100"></TextBox>
                                            </WrapPanel>
                                        </StackPanel>
                                        <DataGrid Grid.Row="1"  Grid.Column="0"  
                                                  AutoGenerateColumns="False" EnableRowVirtualization="True"
                                                  HeadersVisibility="Column" 
                                                  FontSize="12" 
                                                  ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"    
                                                  Width="Auto"
                                                  Height="Auto" 
                                                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                                  ScrollViewer.VerticalScrollBarVisibility="Auto" 
                                                  >
                                            <DataGrid.Columns>
                                                <DataGridTextColumn Binding="{Binding Path=ABPAUFKRS}" Header="类型" Width="Auto" MinWidth="30" />
                                                <DataGridTextColumn Binding="{Binding Path=ABPAUFLFD}" Header="订单号" Width="Auto" MinWidth="40" />
                                                <DataGridTextColumn Binding="{Binding Path=ABPAUFPOS}" Header="订单号" Width="Auto" MinWidth="40" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPSOLLMENGE1}" Header="KG原" Width="Auto" MinWidth="30" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPSOLLMENGE2}" Header="KG成" Width="Auto" MinWidth="30" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPSOLLMENGE5}" Header="MTR原" Width="Auto" MinWidth="30" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPSOLLMENGE6}" Header="MTR成" Width="Auto" MinWidth="30" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPSOLLMENGE8}" Header="个数" Width="Auto" MinWidth="10" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABPLIEFDAT}" Header="交期" Width="Auto" MinWidth="10" />                                                
                                                <DataGridTextColumn Binding="{Binding Path=ABPANRKR}" Header="" Width="Auto" MinWidth="40" />
                                                <DataGridTextColumn Binding="{Binding Path=ABPALFDNR}" Header="流程" Width="Auto" MinWidth="20" />
                                            </DataGrid.Columns>
                                        </DataGrid>
                                        <DataGrid Grid.Row="1"  Grid.Column="1"  
                                                   FontSize="12" ItemsSource="{Binding Source={StaticResource ResourceKey=vwABAUFM}}"    
                                                  AutoGenerateColumns="False" EnableRowVirtualization="True"
                                                  HeadersVisibility="Column" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" 
                                                  Width="266" Height="Auto" EnableColumnVirtualization="True" HorizontalAlignment="Left">
                                            <DataGrid.Columns>
                                                <DataGridTextColumn Binding="{Binding Path=ABAART}" Header="原料" Width="Auto" MinWidth="60" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABAFARBE}" Header="色号" Width="Auto" MinWidth="20" />
                                                <DataGridTextColumn  Binding="{Binding Path=ABARESMG}" Header="数量" Width="Auto" MinWidth="30" />
                                            </DataGrid.Columns>
                                        </DataGrid>
                                    </Grid>
                                </WrapPanel> 
                            </StackPanel>
                        </Grid>
                    </WrapPanel>   
                </StackPanel>
            </Expander>
            <Expander  Name="znWS" Header="技术数据" ExpandDirection="Down" IsExpanded="True" MaxWidth="1000" HorizontalAlignment="Left">
                <StackPanel  DataContext="{Binding Source={StaticResource ResourceKey=vwWASTAMM}}">
                    <StackPanel >
                        <WrapPanel >
                            <TextBlock  >成品信息:</TextBlock>
                            <Label  Margin="20,0,0,0"  Background="Gray" Content="品种:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox Grid.Column="1" Text="{Binding Path=WAART, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="180" CharacterCasing="Upper"/>
                            <TextBlock   Text="/" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox   Grid.Column="1" Text="{Binding Path=WAVAR, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="40" CharacterCasing="Upper" />
                            <Label Background="Gray" Content="计划品名:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBlock  Grid.Column="1" HorizontalAlignment="Left" 
                                        Text="{Binding Path=WADART, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}}" 
                                         VerticalAlignment="Center" Width="185">
                            </TextBlock>
                            <TextBlock   Text="/" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox  Grid.Column="1" Text="{Binding Path=WADVAR, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="Auto" MinWidth="40" />
                        </WrapPanel>
                        <WrapPanel   Margin="86,0,0,0">
                            <Label  Content="描述:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox  MaxLength="40" Text="{Binding Path=WABEZ, Mode=TwoWay, Converter={StaticResource ResourceKey=gb2312}}" 
                                      VerticalAlignment="Center" Width="330" MaxLines="1"  Background="#FFEBA9A9"
                                      >
                            </TextBox>
                            <Label Content="备注:" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBox   MaxLength="40" Text="{Binding Path=WARBEM, Mode=TwoWay, Converter={StaticResource ResourceKey=gb2312}}" 
                                       VerticalAlignment="Center" Width="330" MaxLines="1"
                                       Background="#FFEBA9A9" />
                        </WrapPanel>
                        <WrapPanel  >
                            <Grid Margin="86,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition   Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="经密:" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WAFFDDIK, Mode=TwoWay, Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid   Margin="0,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition   Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="成品纬密:" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WAFFDDIS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid> 
                            <TextBlock >(</TextBlock>
                            <Label  Content="{Binding Path=WAFDDIM}" VerticalAlignment="Center" Width="40" Height="25" />
                            <TextBlock >)</TextBlock>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <WrapPanel  Grid.Column="1">
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <WrapPanel  Grid.Column="1">
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="幅宽:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WAFBRTL, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="Auto" MinWidth="40" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="成品匹长:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WAFSTDLG, Mode=TwoWay,  Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="成品克重:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WAFGRLFD, Mode=TwoWay}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                    <TextBlock>g/m</TextBlock>
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="纬密系数:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WALAEAEND, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="Auto" MinWidth="20" />
                                    <TextBlock >%</TextBlock>
                                </WrapPanel>
                            </Grid>
                        </WrapPanel>
                        <WrapPanel >
                            <TextBlock >坯布信息:</TextBlock>
                            <Grid  Margin="20,0,0,0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label Content="经密:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-2,3,0,3" />
                                <TextBox Grid.Column="1" Text="{Binding Path=WARFDDIK, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid  >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <Label  Content="下机纬密:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <TextBox   Grid.Column="1" Text="{Binding Path=WARFDDIS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition  Width="1*" />
                                    <ColumnDefinition  Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel   Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="幅宽:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel   Grid.Column="1">
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WARWBRT, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="标准匹长:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WARSTDLG, Mode=TwoWay,  Converter={StaticResource ResourceKey=d1000}}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                </WrapPanel>
                            </Grid>
                            <Grid >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition   Width="1*" />
                                    <ColumnDefinition Width="1*" />
                                </Grid.ColumnDefinitions>
                                <WrapPanel  Grid.Column="0">
                                </WrapPanel>
                                <Label  Content="坯布克重:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                <WrapPanel  Grid.Column="1">
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WARGRLFD, Mode=TwoWay}" VerticalAlignment="Center" Width="Auto" MinWidth="60" />
                                    <TextBlock>g/m</TextBlock>
                                </WrapPanel>
                            </Grid>
                        </WrapPanel>
                        <StackPanel  >
                            <WrapPanel  DataContext="{Binding Source={StaticResource ResourceKey=vwWTGEW}}">
                                <TextBlock  >工艺信息:</TextBlock>
                                <Grid   Margin="20,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition   Width="1*" />
                                        <ColumnDefinition   Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="机上纬密:" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-3,3,0,3" />
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WTGFDISM, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid   Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition   Width="1*" />
                                        <ColumnDefinition   Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="引纬纱长:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WTGFDLGS, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <Grid  Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition  Width="1*" />
                                        <ColumnDefinition  Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label   Content="筘幅:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox   Grid.Column="1" Text="{Binding Path=WTGWBBRT, Mode=TwoWay,  Converter={StaticResource ResourceKey=d10}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <TextBlock >cm</TextBlock>
                                <Grid Margin="10,0,0,0">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Content="筘号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBox  Grid.Column="1" Text="{Binding Path=WTGWBF, Mode=TwoWay,  Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwWTGEW}}" VerticalAlignment="Center" Width="60" />
                                </Grid>
                                <TextBlock Width="11">#</TextBlock>
                            </WrapPanel>
                            <WrapPanel  Margin="92,0,0,0">
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_33" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_34" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label Content="纹板图" VerticalAlignment="Center" Margin="-2,1,2,1" />
                                    <TextBlock Grid.Column="1" Background="Wheat" 
                                              Width="Auto"
                                              MinWidth="100"
                                              HorizontalAlignment="Left"  
                                              Text="{Binding Path=WABIND, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}, Converter={StaticResource ResourceKey=gb2312}}" 
                                              >
                                    </TextBlock>
                                </Grid>
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*" />
                                        <ColumnDefinition Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <Label  Content="扦筘法:" VerticalAlignment="Center" Margin="0,1" />
                                    <TextBlock  Grid.Column="1" HorizontalAlignment="Left" 
                                                Text="{Binding Path=WAEINZNR, Mode=TwoWay, Source={StaticResource ResourceKey=vwWASTAMM}}" 
                                                VerticalAlignment="Center" Width="120">
                                    </TextBlock>
                                </Grid>
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Uid="ColumnDefinition_37" Width="1*" />
                                        <ColumnDefinition x:Uid="ColumnDefinition_38" Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <WrapPanel  Grid.Column="0">
                                    </WrapPanel>
                                    <Label  Content="纬向排花:" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <WrapPanel Grid.Column="1">
                                        <TextBlock Background="Wheat" HorizontalAlignment="Left" 
                                               Text="{Binding Path=WTGSFLG, Source={StaticResource ResourceKey=vwWTGEW}, Mode=TwoWay}"  
                                                  Width="120">
                                        </TextBlock>
                                    </WrapPanel>
                                </Grid> 
                            </WrapPanel>
                        </StackPanel>
                    </StackPanel>
                    <DataGrid  
                AutoGenerateColumns="False" EnableRowVirtualization="True" 
                                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwWASTKE}}" 
                                              HeadersVisibility="Column" x:Name="dlgWASTKE" 
                                              CanUserReorderColumns="True" 
                                              CanUserResizeRows="True" CanUserSortColumns="True" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected" 
                                              Width="Auto" Height="Auto" 
                                              EnableColumnVirtualization="True"
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn  Binding="{Binding Path=WAKKART}" Header="织轴品种"  Width="Auto" MinWidth="80" />
                            <DataGridTextColumn Binding="{Binding Path=WAKKVAR}" Header="版本"  Width="Auto" MinWidth="20"  />
                            <DataGridTextColumn  Binding="{Binding Path=WAKKFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="色号"  Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAKEAFAKTR}" Header="系数"  Width="Auto" MinWidth="40"  />
                            <DataGridTextColumn Binding="{Binding Path=WAKLLEIST}" Header="左布边"  Width="Auto" MinWidth="60"  />
                            <DataGridTextColumn Binding="{Binding Path=WAKRLEIST}" Header="右布边"  Width="Auto" MinWidth="60" />
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  AutoGenerateColumns="False" EnableRowVirtualization="True" 
                      ItemsSource="{Binding Source={StaticResource ResourceKey=vwBASTGA}}" HeadersVisibility="Column" x:Name="dlgBBASTGA" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" 
                       RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=BAGPOS}" Header="行" Width="Auto" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=BAGGART}" Header="纱线" Width="Auto" MinWidth="120" />
                            <DataGridTextColumn Binding="{Binding Path=BAGGVAR}" Header="版本" Width="Auto" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=BAGFDZ}" Header="根数" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=BAGABF, Converter={StaticResource ResourceKey=d10}}" Header="损耗" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=BAGKGNET, Converter={StaticResource ResourceKey=d1000}}" Header="净重" Width="Auto" MinWidth="60" />
                            <DataGridTextColumn Binding="{Binding Path=BAGKGBRUT, Converter={StaticResource ResourceKey=d1000}}" Header="总重" Width="Auto" MinWidth="60" />
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid Grid.Column="0" AutoGenerateColumns="False" EnableRowVirtualization="True" ItemsSource="{Binding Source={StaticResource ResourceKey=vwWASTGA}}" HeadersVisibility="Column" x:Name="dlgWASTGA" CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" 
                      RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto" Height="Auto" EnableColumnVirtualization="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=WAGPOS}" Header="行" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAGGART}" Header="纱线" Width="Auto" MinWidth="160" />
                            <DataGridTextColumn Binding="{Binding Path=WAGGVAR}" Header="版本" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAGFDZ}" Header="根数" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAGABF,  Converter={StaticResource ResourceKey=d10}}" Header="损耗" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAGKGNET, Converter={StaticResource ResourceKey=d1000}}" Header="净重" Width="Auto" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=WAGKGBRUT,  Converter={StaticResource ResourceKey=d1000}}" Header="总重" Width="Auto" MinWidth="40" />
                        </DataGrid.Columns>
                    </DataGrid>
                </StackPanel>
            </Expander> 
        </StackPanel> 
    </Grid>
</local:DocumentBase>